home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / UTILITY2 / RFDML120.ZIP / UNIX_CIS.SCR < prev    next >
Text File  |  1994-02-03  |  20KB  |  725 lines

  1. ;------------------------------------------------------
  2. ;
  3. ;UNIX.SCR --- The script file for UNIX (world.std.com)
  4. ;
  5. ;------------------------------------------------------
  6. ;
  7. ;   We begin with the format specifiers to which allow
  8. ;the script to identify where the MailId, RealName,
  9. ;and Subject texts are in a newly downloaded letter.
  10. ;
  11. Format
  12. Subject: $SUBJECT$\n
  13. Subj: $SUBJECT$\n
  14. From: "$NAME$" <$UID$>\n
  15. From: ""$NAME$"" <$UID$>\n
  16. From: $NAME$<$UID$>\n
  17. From: $UID$ ($NAME$)\n
  18. From: $UID$ \n
  19. From: $UID$\n
  20. Endformat
  21. ;------------------------------------------------------
  22. ;
  23. ;   Next is a set of aliases which determine various
  24. ; items such as where some of the standard commands
  25. ; like '/usr/ucb/mail' live.
  26. ;
  27. Alias sendmail '/usr/ucb/mail '
  28. Alias readmail '/usr/ucb/mail'
  29. Alias saveletter 's '
  30. Alias deleteletter 'd '
  31. Alias quitmail 'q'
  32. Alias mailnull '#'
  33. Alias mailshellesc '!'
  34. Alias rm '/bin/rm -f '
  35. Alias echo '/bin/echo '
  36. Alias cat '/bin/cat '
  37. Alias logoff 'exit'
  38. ;------------------------------------------------------
  39. ;
  40. ; The following aliases determine the various prompts the
  41. ; script will look for.  The most important one is the
  42. ; 'prompt' alias, which will need to be adjusted to match
  43. ; the prompt that your UNIX host gives.
  44. ;
  45. Alias prompt '\nworld%'
  46. Alias mailprompt '\n& '
  47. Alias subjectprompt '\nSubject: '
  48. Alias ccprompt1 'Cc:'
  49. Alias ccprompt2 'CC:'
  50. Alias ccprompt3 'cc:'
  51. Alias loginprompt '\nlogin: '
  52. Alias passwdprompt '\nPassword:'
  53. Alias havemailprompt 'message'
  54. Alias nomailprompt 'No mail'
  55. Alias nodiskprompt1 'Disc quota exceeded'
  56. Alias nodiskprompt2 'file system is full'
  57. Alias nodiskprompt3 'no such file'
  58. ;
  59. ; If you want to append your ~/.signature file to every outgoing
  60. ; message, set the following alias to SEND_SIG, otherwise set it
  61. ; to NO_SIGNATURE:
  62. ;
  63. Alias signature NO_SIGNATURE
  64. ;
  65. ;------------------------------------------------------
  66. ;
  67. ; The following aliases determine what the script will look
  68. ; for to determine that we've successfully logged in
  69. ; (banner1-3), and what it will look for to determine that
  70. ; we've successfully logged out (logoffbanner1-2)
  71. ;
  72. Alias banner1 'Public Access Unix'
  73. Alias banner2 'New World'
  74. Alias banner3 '\nLast login:'
  75. Alias logoffbanner1 %loginprompt%
  76. Alias logoffbanner2 'closed'
  77. ;------------------------------------------------------
  78. ;
  79. ; The following alias determines what intermediate network
  80. ; will be assumed.  It can be one of the following:
  81. ;
  82. ;    DIRECT    Direct connection to the host (default)
  83. ;    DIRLAT    Direct connection to a LAT
  84. ;    CIS    Connect through CIS Packet Net
  85. ;
  86. Alias connectype CIS
  87. ;
  88. ; The following alias should be set TRUE if your modem
  89. ; drops carrier every time you make a connection.  This
  90. ; alias simply forces the script to wait 2 seconds for
  91. ; the connection to settle before starting the script.
  92. ;
  93. Alias waitasec FALSE
  94. ;
  95. ;------------------------------------------------------
  96. ;
  97. ; The following aliases define the connection and password
  98. ; keywords to specify for CIS Packet Net.  They are currently
  99. ; set to connect to world.std.com, and need to be changed
  100. ; for any other UNIX site.
  101. ;
  102. Alias cisconnect 'world,domestic'
  103. Alias cispasswd 'notobvious'
  104. Alias cisconnprompt 'Connected to world.std.com'
  105. ;
  106. ;------------------------------------------------------
  107. ;
  108. ; Set the following aliases to reflect your LAT's prompt if you
  109. ; are connecting through a LAT:
  110. ;
  111. Alias latprompt1 'local>'
  112. Alias latprompt2 'Local>'
  113. ;
  114. ; Set the following alias to be the command which connects your LAT
  115. ; to the host
  116. ;
  117. Alias hostconnect 'open hostname'
  118. ;
  119. ;------------------------------------------------------
  120. ;
  121. ; The following aliases determine the command to use for
  122. ; downloading, and the prompt the upload program will send
  123. ; when it's ready to send data.  Comment these out if
  124. ; you don't want to use ZMODEM:
  125. ;
  126. Alias sz 'sz '
  127. Alias szprompt1 '\nsz: 1 file'
  128. Alias dnloadproto ZMODEM
  129. ;
  130. ; Uncomment the following aliases if you want to use YMODEM
  131. ; as your download protocol:
  132. ;
  133. ;Alias sz 'sb '
  134. ;Alias szprompt1 '\nsb: 1 file'
  135. ;Alias dnloadproto YMODEM
  136. ;
  137. ; Uncomment the following aliases if you want to use XMODEM
  138. ; as your download protocol:
  139. ;
  140. ;Alias sz 'sx '
  141. ;Alias szprompt1 'command now.'
  142. ;Alias dnloadproto XMODEM
  143. ;
  144. ;------------------------------------------------------
  145. ;
  146. ; The following aliases determine the command to use for
  147. ; uploading, and the prompt the upload program will send
  148. ; when it's ready to receive data.  Comment these out if
  149. ; you don't want to use ZMODEM:
  150. ;
  151. ;Alias rz 'rz -a '
  152. ;Alias rzprompt1 'to your modem'
  153. ;Alias rzprompt2 'ready'
  154. ;Alias uploadproto ZMODEM
  155. ;
  156. ; Uncomment the following aliases if you want to use YMODEM
  157. ; as your upload protocol:
  158. ;
  159. ;Alias rz 'rb -a '
  160. ;Alias rzprompt1 'to your modem'
  161. ;Alias rzprompt2 'ready'
  162. ;Alias uploadproto YMODEM
  163. ;
  164. ; Uncomment the following aliases if you want to use XMODEM
  165. ; as your upload protocol:
  166. ;
  167. ;Alias rz 'rx -ac '
  168. ;Alias rzprompt1 'to your modem'
  169. ;Alias rzprompt2 'ready to receive'
  170. ;Alias uploadproto XMODEM
  171. ;
  172. ; Uncomment the following aliases if you want to use KERMIT
  173. ; as your upload protocol:
  174. ; (note that you *must* use kermit on CIS Packet Net)
  175. ;
  176. Alias rz 'kermit -e 256 -r '
  177. Alias rzprompt1 'READY TO RECEIVE'
  178. Alias rzprompt2 'ready to receive'
  179. Alias uploadproto KERMIT
  180. ;
  181. ;------------------------------------------------------
  182. ; This is the main entry-point for the script, which
  183. ; decides which intermediate network will be used to
  184. ; connect to the host.
  185. ;
  186. Begin START
  187.    If %waitasec% Then WAIT_START
  188.    If TRUE Then %connectype%
  189. End
  190. Begin WAIT_START
  191.    Timeout 2 Goto %connectype%
  192. End
  193. ;------------------------------------------------------
  194. ; This is the entry-point for direct-connection to the
  195. ; host.  This state merely sends CR's every three
  196. ; seconds until it sees a login prompt.
  197. ;
  198. Begin DIRECT
  199.    Caption 'connected'
  200.    Cr
  201.    When %loginprompt% Goto USERNAME
  202.    Timeout 3 Goto START
  203. End
  204. ;------------------------------------------------------
  205. ; This is the entry-point for the CIS Packet Net connection
  206. ; to the host.  It merely answers the Host Name and Password
  207. ; prompts for the desired host.  Don't worry about the
  208. ; seemingly 'garbaged' When statements.  They are that way
  209. ; to account for an 8n1 connection to a CIS node which
  210. ; insists on talking 7e1.
  211. ;
  212. Begin CIS
  213.    Caption 'CIS Connect'
  214.    Cr
  215.    When '\nHost Name:' Goto CISHOSTNAME
  216.    When 'Ho≤táNßφe:' Goto CISHOSTNAME
  217.    Timeout 3 Goto CIS
  218. End
  219. Begin CISHOSTNAME
  220.    Transmit %cisconnect%
  221.    Cr
  222.    When '\nHost Name:' Goto CISHOSTNAME
  223.    When 'Ho≤táNßφe:' Goto CISHOSTNAME
  224.    When '\nPassword:' Goto CISHOSTPASSWORD
  225.    When 'Pß≤≤worΣ:' Goto CISHOSTPASSWORD
  226.    Timeout 30 Goto GIVE_UP
  227. End
  228. Begin CISHOSTPASSWORD
  229.    Transmit %cispasswd%
  230.    Cr
  231.    When '\nHost Name:' Goto CISHOSTNAME
  232.    When 'Ho≤táNßφe:' Goto CISHOSTNAME
  233.    When '\nPassword:' Goto CISHOSTPASSWORD
  234.    When 'Pß≤≤worΣ:' Goto CISHOSTPASSWORD
  235.    When %cisconnprompt% Goto CONNECTHOST
  236.    When %loginprompt% Goto USERNAME
  237.    Timeout 30 Goto GIVE_UP
  238. End
  239. Begin CONNECTHOST
  240.    Caption 'logging in'
  241.    When %loginprompt% Goto USERNAME
  242.    Timeout 30 Goto GIVE_UP
  243. End
  244. ;------------------------------------------------------
  245. ; These two states handle connecting to the host
  246. ; once we're directly connected to the LAT
  247. ;
  248. Begin DIRLAT
  249.    Caption 'connected'
  250.    Cr
  251.    When %latprompt1% Goto LOCAL_PROMPT
  252.    When %latprompt2%  Goto LOCAL_PROMPT
  253.    Timeout 3 Goto START
  254. End
  255. Begin LOCAL_PROMPT
  256.    Transmit %hostconnect%
  257.    Cr
  258.    When %latprompt1% Goto LOCAL_PROMPT
  259.    When %latprompt2%  Goto LOCAL_PROMPT
  260.    When %loginprompt% Goto USERNAME
  261.    Timeout 30 Goto GIVE_UP
  262. End
  263. ;------------------------------------------------------
  264. ; At this point we've seen the host's login prompt, and
  265. ; are attempting to log in.
  266. ;
  267. Begin USERNAME
  268.    Transmit $USERNAME
  269.    Cr
  270.    When %passwdprompt% Goto PASSWORD
  271.    When %loginprompt% Goto USERNAME
  272.    Timeout 120 Goto NO_LOGIN
  273. End
  274. Begin PASSWORD
  275.    Transmit $PASSWORD
  276.    Cr
  277.    When %passwdprompt% Goto PASSWORD